The PCM functionality allows the use of a codec like for example the MC145483. This codec replaces the analog audio inputs and outputs during a call, if digital audio is selected by AT^SAIC. The PCM interface is configurable with the AT^SAIC command (see
[1]) and supports the following features:
Table 18 shows the assignment of the DAI0...6 pins to the PCM interface signals. To avoid hardware conflicts different pins are used as inputs and outputs for frame sync and clock signals in master or slave operation. The table shows also which pin is used for master or slave. The data pins (TXDAI and RXDAI) however are used in both modes. Unused inputs have to be tied to GND, unused outputs must be left open.
To clock input and output PCM samples the PCM interface delivers a bit clock (BITCLK) which is synchronous to the GSM system clock. The frequency of the bit clock is 256kHz or 512kHz. Any edge of this clock deviates less than ±100ns (Jitter) from an ideal 256kHz clock respectively deviates less than ±320ns from an ideal 512kHz clock.
The frame sync signal (FS) has a frequency of 8kHz and is high for one BITCLK period before the data transmission starts if short frame is configured. If long frame is selected the frame sync signal (FS) is high during the whole transfer of the 16 data bits. Each frame has a duration of 125µs and contains 32 respective 64 clock cycles.
The timing of a PCM short frame is shown in
Figure 30. The 16-bit TXDAI and RXDAI data is transferred simultaneously in both directions during the first 16 clock cycles after the frame sync pulse. The duration of a frame sync pulse is one BITCLK period, starting at the rising edge of BITCLK. TXDAI data is shifted out at the next rising edge of BITCLK. RXDAI data (i.e. data transmitted from the host application to the module's RXDAI line) is sampled at the falling edge of BITCLK.
The timing of a PCM long frame is shown in
Figure 31. The 16-bit TXDAI and RXDAI data is transferred simultaneously in both directions while the frame sync pulse FS is high. For this reason the duration of a frame sync pulse is 16 BITCLK periods, starting at the rising edge of BITCLK. TXDAI data is shifted out at the same rising edge of BITCLK. RXDAI data (i.e. data transmitted from the host application to the module's RXDAI line) is sampled at the falling edge of BITCLK.
In slave mode the PCM interface is controlled by an external bit clock and an external frame sync signal applied to the BCLKIN and FSIN pins and delivered either by the connected codec or another source. The bit clock frequency has to be in the range of 256kHz -125ppm to 512kHz +125ppm.
Data transfer starts at the falling edge of FSIN if the short frame format is selected, and at the rising edge of FSIN if long frame format is selected. With this edge control the frame sync signal is independent of the frame sync pulse length.
Figure 32 shows the typical slave configuration. The external codec delivers the bit clock and the frame sync signal. If the codec itself is not able to run in master mode as for example the MC145483, a third party has to generate the clock and the frame sync signal.
The following figures show the slave short and long frame timings. Because these are edge controlled, frame sync signals may deviate from the ideally form as shown with the dotted lines.